Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stdarch submodule and remove special handling in cranelift codegen for some AVX and SSE2 LLVM intrinsics #115580

Merged
merged 3 commits into from
Sep 7, 2023

Conversation

eduardosm
Copy link
Contributor

rust-lang/stdarch#1463 reimplemented some x86 intrinsics to avoid using some x86-specific LLVM intrinsics:

  • Store unaligned (_mm*_storeu_*) use <*mut _>::write_unaligned instead of llvm.x86.*.storeu.*.
  • Shift by immediate (_mm*_s{ll,rl,ra}i_epi*) use if (srl, sll) or min (sra) to simulate the behaviour when the RHS is out of range. RHS is constant, so the if/min will be optimized away.

This PR updates the stdarch submodule to pull these changes and removes special handling for those LLVM intrinsics from cranelift codegen. I left gcc codegen untouched because there are some autogenerated lists.

Those were removed from stdarch in rust-lang/stdarch#1463 (`<*mut _>::write_unaligned` is used instead)
…ediate intrinsics

Those were removed from stdarch in rust-lang/stdarch#1463 (`simd_shl` and `simd_shr` are used instead)
@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2023

⚠️ Warning ⚠️

  • These commits modify submodules.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 5, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2023

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but not too familiar with this so will get a second pair of eyes

@davidtwco
Copy link
Member

r? @bjorn3

@rustbot rustbot assigned bjorn3 and unassigned davidtwco Sep 6, 2023
@bjorn3
Copy link
Member

bjorn3 commented Sep 6, 2023

Tested locally. Works fine. Thanks for working on this @eduardosm!

@bors r=davidtwco,bjorn3

@bors
Copy link
Contributor

bors commented Sep 6, 2023

📌 Commit 0b6ee86 has been approved by davidtwco,bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 6, 2023
@klensy
Copy link
Contributor

klensy commented Sep 6, 2023

Other stdarch bump #115617

@bjorn3
Copy link
Member

bjorn3 commented Sep 6, 2023

Didn't see that one. Both update stdarch to the exact same commit and this one also removes some now unused code in cg_clif.

@coastalwhite
Copy link
Contributor

Whoops. Didn’t see this one, should all be fine though right?

@bors
Copy link
Contributor

bors commented Sep 6, 2023

⌛ Testing commit 0b6ee86 with merge b0d4553...

@bors
Copy link
Contributor

bors commented Sep 7, 2023

☀️ Test successful - checks-actions
Approved by: davidtwco,bjorn3
Pushing b0d4553 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 7, 2023
@bors bors merged commit b0d4553 into rust-lang:master Sep 7, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 7, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b0d4553): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
1.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 630.181s -> 628.074s (-0.33%)
Artifact size: 317.88 MiB -> 317.96 MiB (0.03%)

@eduardosm eduardosm deleted the stdarch-intrinsics branch September 7, 2023 22:46
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Oct 9, 2023
…dtwco,bjorn3

Update stdarch submodule and remove special handling in cranelift codegen for some AVX and SSE2 LLVM intrinsics

rust-lang/stdarch#1463 reimplemented some x86 intrinsics to avoid using some x86-specific LLVM intrinsics:

* Store unaligned (`_mm*_storeu_*`) use `<*mut _>::write_unaligned` instead of `llvm.x86.*.storeu.*`.
* Shift by immediate (`_mm*_s{ll,rl,ra}i_epi*`) use `if` (srl, sll) or `min` (sra) to simulate the behaviour when the RHS is out of range. RHS is constant, so the `if`/`min` will be optimized away.

This PR updates the stdarch submodule to pull these changes and removes special handling for those LLVM intrinsics from cranelift codegen. I left gcc codegen untouched because there are some autogenerated lists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants